<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"
           %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
           %><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
           %><%@ taglib tagdir="/WEB-INF/tags" prefix="cohesion"
           %><%@ page contentType="text/html;charset=ISO-8859-1"
           %><html:html>
    <head>
        <title><bean:message key="VFactura.title"/></title>
        <html:base/>

        <%@include file="../header/include.jsp" %>

    </head>
    <body>
        <div id="header"  class="ui-widget-header ui-corner-all">
            <h1><bean:message key="all.title"/></h1>
            <div id="menu">
                <ul id="nav">
                </ul>
            </div>
        </div>
        <div id="body_wrapper">
            <div id="body">
                <div id="split">
                    <div class="top"></div>
                    <div id="left">
                        <div id="content">
                            <div class="ui-widget-header ui-corner-top "> <h1> Factura </h1></div>
                            <script type="text/javascript">
                                $(function() {
                                    $("#tabs").tabs();
                                });
                            </script>
                            <div  class="ui-widget-content ui-widget">
                                <div id="tabs">
                                    <ul>
                                        <li><a href="#tabs-1">Datos Generales</a></li>
                                        

                                    </ul>
                                    <div id="tabs-1">
                                        <html:form action="/AFacturarPresupuesto.do" method="post">

                                             <div  style="margin-bottom:10px;"  class="formRow <logic:notEmpty name="nombreError"> ui-state-error ui-corner-all</logic:notEmpty>">
                                                <div class="labelRow">
                                                    <label for="940930">Nombre</label>
                                                </div>
                                                <div class="inputRow">
                                                    <html:text styleId="940930" property="nombre" size="50"/>
                                                </div>
                                                <logic:notEmpty name="nombreError">
                                                    ${nombreError}
                                                </logic:notEmpty>
                                            </div>

                                            <div class="formRow <logic:notEmpty name="rifError"> ui-state-error ui-corner-all</logic:notEmpty>" style="margin-bottom:10px;">
                                                <div class="labelRow">
                                                    <label for="939164">Rif o Cedula<%-- Rif o Cedula --%></label>
                                                </div>
                                                <div class ="inputRow">
                                                    <html:text styleId="939164" property="rifCedula" size="50"/>
                                                </div>
                                                <logic:notEmpty name="rifError">
                                                    ${rifError}
                                                </logic:notEmpty>
                                            </div>

                                            <div class="formRow" style="margin-bottom:10px;" >
                                                <div class="labelRow">
                                                    <label for="940921">Razon Social<%-- Razon Social --%></label>
                                                </div>
                                                <div class ="inputRow">
                                                    <html:text styleId="940921" property="razon_Social" size="50"/>
                                                </div>
                                            </div>

                                            <div class="formRow <logic:notEmpty name="direccionError"> ui-state-error ui-corner-all</logic:notEmpty>" style="margin-bottom:10px;">
                                                <div class="labelRow">
                                                    <label for="940924">Direccion</label>
                                                </div>
                                                <div class="inputRow">
                                                    <html:textarea styleId="940924" property="direccion" cols="60" rows="5"></html:textarea>
                                                </div>
                                                <logic:notEmpty name="direccionError">
                                                    ${direccionError}
                                                </logic:notEmpty>
                                            </div>

                                            <div class="formRow" style="margin-bottom:10px;">
                                                <div class="labelRow">
                                                    <label for="940927">Telefono </label>
                                                </div>
                                                <div class="inputRow">
                                                    <html:text styleId="940927" property="telefono" size="50"/>
                                                </div>
                                            </div>

                                            <div class="show ui-grid-table ui-widget ui-corner-all ui-helper-reset ui-helper-clearfix">
                                                <table border="1">
                                                    <thead>
                                                        <tr>
                                                            <th class="atributos ui-state-default ui-th-column" style="width: 40px;">Facturar?</th>
                                                            <th class="atributos ui-state-default ui-th-column">Nombre</th>
                                                            <th class="atributos ui-state-default ui-th-column" style="width: 40px;">Cantidad</th>
                                                            <th class="atributos ui-state-default ui-th-column" style="width: 60px;">Cantidad a Facturar</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <% request.setAttribute("_vacio", new Object[0]);%>
                                                        <logic:iterate id="producto" collection="${empty L_Productos ? _vacio : L_Productos}">
                                                            <tr>
                                                                <td class="valor sf_admin_row ui-widget-content" style="width: 40px;">
                                                                    <input type="checkbox" name="check_${producto.idCatalogo.idCatalogo}"/>
                                                                </td>
                                                                <td class="valor sf_admin_row ui-widget-content">
                                                                    ${producto.idCatalogo.nombre}
                                                                </td>

                                                                <td class="valor sf_admin_row ui-widget-content" style="width: 40px;"> ${producto.cantidad}
                                                                    <input type="hidden" value="${producto.cantidad}" name="cantidaddisp_${producto.idCatalogo.idCatalogo}"></td>
                                                                <td class="valor sf_admin_row ui-widget-content" style="width: 60px;"><input type="text" name="cantidad_${producto.idCatalogo.idCatalogo}" size="3" value="${producto.cantidad}"></td>
                                                            </tr>
                                                        </logic:iterate>
                                                    </tbody>
                                                </table>
                                            </div>
                                                        <html:submit styleClass="fg-button-mini fg-button ui-state-default" style="padding: 5px 10px 5px 10px;">Facturar</html:submit>
                                        </html:form>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div id="right">


                        <%@include file="../administrador/VMenuAdmin.jsp" %>
                    </div>
                    <div class="clearer ui-helper-clearfix"></div>
                    <div class="bottom"></div>
                </div>
                <div class="clearer"></div>
            </div>
            <div class="clearer"></div>
        </div>
        <div id="end_body"></div>
        <div id="footer"> <%@include file="/footer/include.jsp" %> </div>
    </body>

</html:html>